package com.company.代理模式2;

import com.company.代理模式.Inviter;
import com.company.代理模式2.impl.Dailiduixiang;
import com.company.代理模式2.impl.Dailimubiao;

public class Test {
    public static void main(String[] args) throws InstantiationException, IllegalAccessException {

        Agent AgentProxy = Utils.getAgentProxy(
                Dailimubiao.class,
                Agent.class,
                new BeforeAfterAction(){
                    @Override
                    public void after() {
                        System.out.println("代理商将电脑以11000卖给客户");
                    }
                    public void before(){
                        System.out.println("代理商10000买到厂商的电脑");
                    }
                }
        );
        AgentProxy.fun();
    }
}
